<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns:shro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>编辑轮播图</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="cjf">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="/css/style.min.css" rel="stylesheet">
    <!-- 弹出框 -->
    <link rel="stylesheet" href="/js/jconfirm/jquery-confirm.min.css">
    <link rel="stylesheet" href="/css/carousel/editCarousel.css">
</head>

<body>
<div class="container-fluid p-t-15">
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header">
                    <!-- first -->
                    <div style="display: flex;margin-bottom: 30px;border: 1px solid #ededed;padding: 16px;">
                        <form class="form-horizontal" action="#!" method="post" style="width: 59%;margin-right: 20px;">
                            <div class="form-group">
                                <label class="col-xs-2 control-label">标题：</label>
                                <div class="col-xs-9">
                                    <input id="newsTitle0" class="form-control" th:value="${news[0].newsTitle}" type="text" placeholder="请输入标题">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-2 control-label">内容：</label>
                                <div class="col-xs-9">
                                    <textarea id="newsContent0" th:text="${news[0].newsContent}" class="form-control" rows="5" placeholder="请输入内容" ></textarea>
                                </div>
                                <div id="newsId0" style="display: none" th:text="${news[0].newsId}"></div>
                            </div>
                            <button class="btn btn-primary" onclick="saveNews(0)" type="button"  style="margin-left: 50%;transform: translateX(-50%);height: 30px;display: flex;align-items: center;">提交</button>
                        </form>
                        <div class="img-box" style="width: 39%;">
                            <img id="newsPic0" th:src="@{(${news[0].accessUrl})}" />
                            <div id="imageId0" style="display: none" th:text="${news[0].uploadId}"></div>
                            <input type="file" id="files0"  onchange="getNewsPicUpload(this,0)" class="img-button" style="display: flex;justify-content: center;align-items: center;width: 74px;height: 30px;margin-left: 50%;transform: translateX(-50%);margin-top: 10px;"/>
                        </div>
                    </div>
                    <!-- second -->
                    <div style="display: flex;margin-bottom: 30px;border: 1px solid #ededed;padding: 16px;">
                        <form class="form-horizontal" action="#!" method="post" style="width: 59%;margin-right: 20px;">
                            <div class="form-group">
                                <label class="col-xs-2 control-label">标题：</label>
                                <div class="col-xs-9">
                                    <input id="newsTitle1" class="form-control" th:value="${news[1].newsTitle}" type="text" placeholder="请输入标题">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-2 control-label">内容：</label>
                                <div class="col-xs-9">
                                    <textarea id="newsContent1" class="form-control" th:text="${news[1].newsContent}" rows="5" placeholder="请输入内容" ></textarea>
                                </div>
                                <div id="newsId1" style="display: none" th:text="${news[1].newsId}"></div>
                            </div>
                            <button class="btn btn-primary" onclick="saveNews(1)" type="button" style="height: 30px;display: flex;align-items: center;margin-left: 50%;transform: translateX(-50%);">提交</button>
                        </form>
                        <div class="img-box" style="width: 39%;">
                            <img id="newsPic1" th:src="@{(${news[1].accessUrl})}" />
                            <div id="imageId1" style="display: none" th:text="${news[1].uploadId}"></div>
                            <input type="file" id="files1"  onchange="getNewsPicUpload(this,1)"  class="img-button" style="display: flex;justify-content: center;align-items: center;width: 74px;height: 30px;margin-left: 50%;transform: translateX(-50%);margin-top: 10px;"/>
                        </div>
                    </div>
                    <!-- third -->
                    <div style="display: flex;margin-bottom: 30px;border: 1px solid #ededed;padding: 16px;">
                        <form class="form-horizontal" action="#!" method="post" style="width: 59%;margin-right: 20px;">
                            <div class="form-group">
                                <label class="col-xs-2 control-label">标题：</label>
                                <div class="col-xs-9">
                                    <input id="newsTitle2" class="form-control" th:value="${news[2].newsTitle}" type="text" placeholder="请输入标题">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-2 control-label">内容：</label>
                                <div class="col-xs-9">
                                    <textarea id="newsContent2" class="form-control" th:text="${news[2].newsContent}" rows="5" placeholder="请输入内容" ></textarea>
                                </div>
                                <div id="newsId2" style="display: none" th:text="${news[2].newsId}"></div>
                            </div>
                            <button class="btn btn-primary" onclick="saveNews(2)" type="button" style="height: 30px;display: flex;align-items: center;margin-left: 50%;transform: translateX(-50%);">提交</button>
                        </form>
                        <div class="img-box" style="width: 39%;">
                            <img id="newsPic2" th:src="@{(${news[2].accessUrl})}" />
                            <div id="imageId2" style="display: none" th:text="${news[2].uploadId}"></div>
                            <input type="file" id="files2"  onchange="getNewsPicUpload(this,2)"  class="img-button" style="display: flex;justify-content: center;align-items: center;width: 74px;height: 30px;margin-left: 50%;transform: translateX(-50%);margin-top: 10px;"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/crm/common/common.js"></script>

<script type="text/javascript" src="/js/crm/carousel/editCarousel.js"></script>
<!-- 弹出框 -->
<script src="/js/jconfirm/jquery-confirm.min.js"></script>

</body>
</html>
